[walker@generic]
gather_items_enabled = false
help_wounded_enabled = true
corpse_detection_enabled = false
wounded = wounded
danger = danger

;----------------------------------------------------------------------------------------------------------

[logic@jup_b1_stalker_3]
suitable = {=check_npc_name(jup_b1_stalker_3) !actor_has_item(jup_b1_half_artifact) -jup_b1_task_done} true
prior = 70
active = walker@first
on_death = death
on_combat = combat
post_combat_time = 0, 0

[walker@first]:walker@generic
path_walk = st_3_first_stand
path_look = st_3_first_look
on_info = {=actor_has_item(jup_b1_half_artifact)} camper@zombie, {+jup_b1_start} walker@go_to_tunnel
on_info2 = {+jup_b1_st_go_home} patrol@go_to_base

[walker@go_to_tunnel]:walker@generic
def_state_moving1 = assault
path_walk = st_3_go_1
path_look = st_3_look_1
on_info = {+jup_b1_zomb_is_dead +jup_b1_zomb_3_is_dead +jup_b1_zomb_2_is_dead} camper@camp, {+jup_b1_st_goin_in} camper@camp
meet = no_meet

[camper@camp]:walker@generic
def_state_moving = sneak_run
path_walk = st_3_go_2
path_look = st_3_look_2
combat_ignore_cond = {=check_enemy_name(jup_b1_zombie_1) -jup_b1_zomb_be_fucked} true
on_signal = at_pos | camper@camp_talk
meet = no_meet

[camper@camp_talk]:walker@generic
path_walk = st_3_go_2
path_look = st_3_look_2
on_info = {+jup_b1_zomb_is_dead +jup_b1_zomb_3_is_dead +jup_b1_zomb_2_is_dead} walker@camp
meet = no_meet

[walker@camp]:walker@generic
path_walk = st_3_go_3
path_look = st_3_look_3
meet = meet@for_art
on_info = {+jup_b1_kill_tuskano} remark@shoot_tushkano
on_info2 = {=dist_to_actor_le(3) -jup_b1_sd_4}  %=play_sound(jup_b1_stalkers_first_stay) +jup_b1_sd_4%

[meet@for_art]
close_distance  = 4
close_anim      = hide
abuse           = false
use = false

[remark@shoot_tushkano]:walker@generic
anim = threat_fire
target =  story | jup_b1_tushkano_target
on_game_timer = 30 | walker@camp2
invulnerable = {!actor_enemy} true, false 
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true
combat_ignore_keep_when_attacked = true 

[walker@camp2]:walker@generic
def_state_moving1 = patrol
path_walk = st_3_go_3
path_look = st_3_look_3
meet = no_meet

;---------------------------------- возврат в нормальное состояние из зомби

[remark@psy_back]:walker@generic
anim = psy_pain
target = path | jup_b1_st_3_zombie_look, 0
on_timer = 10000 | remark@thanks
meet = no_meet
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true 
combat_ignore_keep_when_attacked = true 

[remark@thanks]:walker@generic
anim = hide_no_wpn
target = path | jup_b1_st_3_zombie_look, 0
meet = meet@get_on_air
on_info = {+jup_b1_go_on_air} walker@on_air
on_info2 = {=dist_to_actor_ge(75)} patrol@go_to_base %+jup_b1_go_from_task%, {+jup_b1_go_from_task} patrol@go_to_base
in_restr = jup_b1_anomal_place
on_timer = 15000 | {!talking} walker@on_air

[meet@get_on_air]
close_snd_hello = nil
close_snd_bye = nil
snd_on_use = nil
close_distance  = 10
close_anim      = guard
close_victim    = actor
abuse           = false
meet_dialog	= jup_b1_st_go_to_exit
trade_enable	= false
allow_break     = false

[walker@on_air]:walker@generic
def_state_moving1 = assault
path_walk = st_3_final_stay
path_look =st_3_final_look
on_info = {=dist_to_actor_ge(75)} patrol@go_to_base %+jup_b1_go_from_task%, {+jup_b1_go_from_task} patrol@go_to_base
meet = no_meet
on_signal = at_pos | walker@on_air_talk

[walker@on_air_talk]:walker@generic
path_walk = st_3_final_stay
path_look = st_3_final_look
on_info = {=dist_to_actor_ge(75)} patrol@go_to_base %+jup_b1_go_from_task%, {+jup_b1_go_from_task} patrol@go_to_base
meet = meet@go_home

[meet@go_home]
close_distance  = 10
close_anim      = guard
close_victim    = actor
use 			= true
abuse           = false
trade_enable	= false
allow_break     = false

[patrol@go_to_base]:walker@generic
path_walk = patrol_to_the_home
formation = back
on_signal = at_pos | %-jup_b1_st_mission%
meet = no_meet
on_info = {=health_le(0.5) !actor_enemy} %=restore_health% 

;--------------------превращение в зомби
[logic@jup_b1_zomb_stalker_3] 
suitable = {=check_npc_name(jup_b1_stalker_3) =actor_has_item(jup_b1_half_artifact)} true
prior = 70
active = camper@zombie
on_death = death
on_combat = combat
post_combat_time = 0, 0

[camper@zombie]:walker@generic
path_walk = st_3_zombie_stay
path_look = st_3_zombie_look
on_game_timer = 10 | remark@psy_wounded %+jup_b1_spawn_controller%
radius = 0
no_retreat = true
on_info =  {+jup_b1_go_from_task} patrol@go_to_base, {=dist_to_actor_ge(140)} %=kill_npc%
meet = no_meet
show_spot = false 
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true 
combat_ignore_keep_when_attacked = true 

[remark@psy_wounded]:walker@generic
anim = psy_pain
target = path | jup_b1_st_3_zombie_look, 0
on_info = {=actor_in_zone(jup_b1_zombie_start_zone)} remark@turnin_zombie
on_info2 = {=dist_to_actor_ge(140)} %=kill_npc%
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true 
combat_ignore_keep_when_attacked = true 
meet = no_meet
show_spot = false 

[remark@turnin_zombie]:walker@generic
anim = psy_pain
target = path | jup_b1_st_3_zombie_look, 0
on_info = {+jup_b1_controller_is_dead} remark@psy_back %=set_squad_goodwill(jup_b1_stalker_squad:friend)%
on_info2 = {=dist_to_actor_ge(140)} %=kill_npc%
on_timer = 19000 | walker@zombied %=set_squad_goodwill(jup_b1_stalker_squad:enemy)%
combat_ignore_cond = {=actor_enemy =check_enemy_name(actor)} false, true 
combat_ignore_keep_when_attacked = true 
meet = no_meet

[walker@zombied]:walker@generic
path_walk = st_3_zombie_walk
on_info = {+jup_b1_controller_is_dead} remark@psy_back %=set_squad_goodwill(jup_b1_stalker_squad:friend)%
on_info2 = {=health_le(0.2)} %=restore_health%
on_info3 = {=dist_to_actor_ge(140)} %=kill_npc%
meet = no_meet
in_restr = jup_b1_anomal_place
combat_ignore_cond = {=check_enemy_name(jup_b1_controller)} true

;-------------------------------------------------------------
[danger]
ignore_distance = 0
ignore_distance_grenade = 0
ignore_distance_corpse = 0
ignore_distance_hit = 0
ignore_distance_sound = 0

[wounded]
hp_state 		= 0|wounded_heavy@help_heavy
hp_state_see 	= 0|wounded_heavy@help_heavy
hp_victim 		= 0|nil
hp_fight 		= 0|false
hp_cover		= 0|false

[combat]
on_info = {=actor_enemy} %+jup_b1_actor_atk_squad%

[death]
on_info = {=killed_by_actor -jup_b1_give_task =squad_exist(jup_b1_stalker_squad)} %+jup_b1_actor_atk_squad +jup_1_stalker_squad_killed_before_mission +jup_b1_stalker_3_is_dead =set_squad_enemy_to_actor(jup_b1_stalker_squad) =stop_sound%, {-jup_b1_give_task =squad_exist(jup_b1_stalker_squad)} %+jup_1_stalker_squad_killed_before_mission +jup_b1_stalker_3_is_dead =stop_sound%, {-jup_b1_give_task  +jup_b1_stalker_1_is_dead +jup_b1_stalker_2_is_dead +jup_b1_stalker_4_is_dead} %+jup_1_stalker_squad_killed_before_mission +jup_b1_squad_is_dead  +jup_b1_stalker_3_is_dead =stop_sound%, {+jup_b1_give_task  +jup_b1_stalker_1_is_dead +jup_b1_stalker_2_is_dead +jup_b1_stalker_4_is_dead} %+jup_b1_squad_is_dead +jup_b1_stalker_3_is_dead =stop_sound%, {=killed_by_actor =squad_exist(jup_b1_stalker_squad)} %+jup_b1_stalker_3_is_dead =set_squad_enemy_to_actor(jup_b1_stalker_squad) =stop_sound%, %+jup_b1_stalker_3_is_dead =stop_sound%
